/**
 * 获取数据类型
 * @param {Object} data
 * @returns {String}
 */
function dataType(data) {
    let type = null;
    if (Object.prototype.toString.call(data) === "[object Number]") {
        type = "Number";
    } else if (Object.prototype.toString.call(data) === "[object String]") {
        type = "String";
    } else if (Object.prototype.toString.call(data) === "[object Undefined]") {
        type = "Undefined";
    } else if (Object.prototype.toString.call(data) === "[object Array]") {
        type = "Array";
    } else if (Object.prototype.toString.call(data) === "[object Null]") {
        type = "Null";
    } else if (Object.prototype.toString.call(data) === "[object Object]") {
        type = "Object";
    }
    return type;
}

module.exports = dataType;